package com.htc.book;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;

import com.htc.comp.ImageLoader;
import com.htc.comp.ResourceLoader;

public class HomeActivity extends ActionBarActivity {

	Button btn;
	ImageView iv;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_home);
		
		btn = (Button)findViewById(R.id.btnTest);
		iv = (ImageView)findViewById(R.id.ivbook);
		
		btn.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				String url = "http://m.f5.img.vnecdn.net/2014/12/15/MG-6733-9589-1418653342.jpg";
				ImageLoader loader = new ImageLoader(iv);
				loader.execute(url);
			}
			
		});
	}

}
